package day04;

public class Demo1 {
    public static void main(String[] args) {
        MyInter m = new MyInter();
        method(m);

    }

    public static void method(Inter3 i) {
    i.show();
    i.show1();
    i.show2();
    i.show3();
}
}

//接口
interface Inter3 {
    void show();

    void show1();

    void show2();

    void show3();

}

//方法重写
class MyInter implements Inter3 {
    @Override
    public void show() {
        System.out.println("我是有名字的实现类对象");
    }

    @Override
    public void show1() {
        System.out.println("我是有名字的实现类对象");
    }

    @Override
    public void show2() {
        System.out.println("我是有名字的实现类对象");
    }

    @Override
    public void show3() {
        System.out.println("我是有名字的实现类对象");
    }
}